Method for generating contiguous cartograms

ABSTRACT

The present invention is a method for generating cartograms using a base map of contiguous polygons and a vector containing values to which areas of corresponding polygons are scaled. The general problem is intractable, so an iterative heuristic is proposed. The heuristic is based on “scanlines.” The scanlines may be defined automatically (typically, by placing a grid over the map) or entered manually (to provide finer control over the results). At each step, one scanline is chosen and a new candidate map is made by adjusting the vertices of polygons intersected by the scanline, moving them orthogonally to the scanline. A candidate solution is accepted if it improves the solution and preserves the input mesh&#39;s topology. Improvement depends on metrics for area and shape error. The solver is run until the improvement falls below some threshold, or a time limit or maximum number of iterations is reached 
     The method determines shape error created by a candidate iterative step by first estimating a curvature function of the polygon and then performing a Fourier transform on the function to yield a shape representation that is relatively independent of scale, translation and rotation of the polygon. The proposed iterative step is accepted or discarded based in part on the magnitude of the resulting shape error.

This application claims benefit of Provisional Application 60/359,967filed Feb. 27, 2002.

FIELD OF THE INVENTION

The present invention relates generally to visualization ofgeographically related information, and more particularly, to a methodof automatically or semi-automatically generating a cartogram based onan input set of contiguous polygons and an input data vector.

BACKGROUND OF THE INVENTION

Cartograms are a well-known technique for showing geography-relatedstatistical information, such as population demographics, electionresults and epidemiological data. The basic idea is to distort a map byresizing its regions according to some geographically relatedstatistical parameter, but in a way that keeps the map recognizable.Cartographers and geographers have used cartograms since long beforecomputers were available to make displays. Because cartograms aredifficult to make by hand, the study of programs to draw them is ofinterest.

Other visualization techniques include the conventional choropleth map.A choropleth map is a map divided into regions that are shaded accordingto the value of a variable for that region. High values are oftenconcentrated in highly populated areas, and low values may be spread outacross sparsely populated areas. Such maps therefore tend to highlightpatterns in less dense areas where few people live. In contrast,cartograms display areas in relation to an additional parameter, such aspopulation. Patterns may then be displayed in proportion to thatparameter (e.g. the number of people involved) instead of the raw sizeof the area involved. A population-based cartogram is presented in FIG.1B. The cartogram gives a much different impression of overall trends,as compared with the original map (FIG. 1A).

For a cartogram to be recognizable it is important to preserve theglobal shape or outline of the input map, a requirement that has beenoverlooked in the past. To address this, the inventors' objectivefunction for cartogram drawing includes both global and local shapepreservation. To measure the degree of shape preservation, a shapesimilarity function is proposed. The function is based on a Fouriertransformation of the polygons' curvatures. Also, because theapplication goal is visualization of dynamic network behavior, analgorithm is needed that recalculates a cartogram in a few seconds. Noprevious algorithm known to the inventors provides adequate performancewith an acceptable level of quality for that application.

In the present application, the inventors formally define a family ofcartogram drawing problems, and show that even simple variants areunsolvable in the general case. The feasible variants are NP-complete;i.e., the problem is both NP (verifiable in nondeterministic polynomialtime) and NP hard (any other NP problem can be translated into thisproblem). Heuristics are therefore needed to solve the problem.Previously proposed solutions suffer from problems with the quality ofthe generated drawings.

The present application describes an efficient iterative scanlinealgorithm to reposition edges while preserving local and global shapes.Scanlines may be generated automatically, or entered interactively toguide the optimization process more closely. The algorithm is applied toa number of example data sets, providing a detailed comparison of thetwo variants of our algorithm and previous approaches.

A cartogram can be seen as a generalization of an ordinary map. In thatinterpretation, an arbitrary parameter vector gives the intended sizesof the cartogram's regions, so an ordinary map is simply a cartogramwith sizes proportional to land area. In addition to the classicalapplications mentioned above, a key motivation for cartograms as ageneral information visualization technique is to have a method fortrading off shape and area adjustments.

For a cartogram to be effective, a human must be able to quicklyunderstand the displayed data and relate it to the original geographicalmodel. Recognition, in turn, depends on preserving basic properties,such as shape, orientation, and contiguity. That, however, is difficultto achieve in the general case because it is impossible to retain eventhe original map's topology. Because the generation of contiguouscartograms by simultaneous optimization of those objectives isdifficult, most currently available algorithms are very time-consuming.

Cartograms may be made by contiguous or non-contiguous distortions. Thenon-contiguous case is much simpler because the input map topology doesnot have to be preserved. As seen in FIGS. 2A-2H, hand-madenon-contiguous cartograms have been made with overlapping or touchingcircles (FIG. 2D), by eliminating some of the original map's adjacencies(FIG. 2C), or even by drawing disconnected shapes over the originalregions (FIG. 2B).

Previous attempts to automate the drawing of contiguous cartograms donot yield results comparable to good hand-made drawings. One reason isthat straight lines, right angles and other features consideredimportant in human recognition of cartograms are obliterated. Methodsthat are radial in nature such as the conformal maps proposed by W. R.Tobler, “Cartograms and Cartosplines,” Proceedings of the 1976 Workshopon Automated Cartography and Epidemiology, 53-58 (1976) (FIG. 2A), theradial expansion method of S. Selvin, D. Merrill, J. Schulman, S. Sacks,L. Bedell, and L. Wong, “Transformations of Maps to Investigate Clustersof Disease,” Social Science and Medicine, V. 26, no. 2, at 215-221(1988) (FIG. 2F) and the line integral method of Sabir Gusein-Zade andVladimir Tikunov, “A New Technique for Constructing ContinuousCartograms,” Cartography and Geographic Information Systems, V. 20, no.3 at 66-85 (1993) (FIG. 2G) do not provide acceptable results, since theshapes of the polygons are heavily deformed. Likewise, thepseudo-cartograms described by W. R. Tobler, “Pseudo-Cartograms,” TheAmerican Cartographer, V. 13, no. 1 at 43-40 (1986) (FIG. 2E) expand thelines of longitude and latitude to achieve a least root mean square areaerror. Very similar drawings have been made by approaching the problemas distortion viewing by nonlinear magnification. Radial forces areapplied by Charles B. Jackel, “Using Arcview to Create Contiguous andNoncontiguous Area Cartograms,” Cartography and Geographic InformationSystems, V. 24, no. 2 at 101-109 (1997) to change the size of polygons,moving the sides of each polygon relative to its centroid. That solver,however, runs slowly (e.g., taking 90 minutes to perform 8 iterations ona map of 6 New England states of the U.S.) and seems to have problemswith non-convex input polygons and with self-intersections in theoutput.

Another family of approaches operates on a grid or mesh imposed on theinput map. The “piezopleth” method of C. Cauvin, C. Schneider, and G.Cherrier, “Cartographic Transformations and the Piezopleth Method,” TheCartographic Journal, V. 26, no. 2 at 96-104 (December 1989) transformsthe grid by a physical pressure load model. The cellular automatonapproach of Daniel Dorling, Area Cartograms: Their Use and Creation,Department of Geography (U. Bristol, England, 1 st ed. 1996) trades gridcells until each region achieves the desired number of cells. Thecombinatorial approach of Herbert Edelsbrunner and Roman Waupotitsch, “ACombinatorial Approach to Cartograms,” Computational Geometry 343-360(1997) computes a sequence of piecewise linear homeomorphisms of themesh that preserve its topology. While the first method is good atpreserving the shape of the polygons, the other two methods allow a verygood fit for area but only poor shape preservation.

A synthesis of both approaches was recently described in Christopher J.Kocmoud and Donald H. House, “Continuous Cartogram Construction,”Proceedings IEEE Visualization 197-204 (1998) (FIG. 2H). A force-basedmodel is proposed that alternately optimizes the shape and the areaerror. Although the results are better than most other methods, thecomplex optimization algorithm has a prohibitively high execution time.For example, 18 hours is required for a modest-sized map with 744vertices.

The currently available solutions have two major problems: first, thehigh time complexity of the algorithms restricts their use to staticapplications with a small number of polygons and vertices. Second, theyhave very limited shape preservation. Although the recent work byKocmoud and House provides nice results, some effectiveness problemsremain. One problem is the significant deformation of the global shape.In evaluating the different heuristic solutions which have been proposedso far, the present inventors have found that the insufficientpreservation of the global shape is one of the most important factorsfor cartograms to be effective, and it is certainly at least asimportant as the preservation of interior polygon shapes.

There is presently a need to make dynamic cartograms for on-line networkmonitoring, such as display of traffic or transaction event levels bycountry, state, and local regions. That application requires cartogramgeneration on the fly, and further requires generation of cartogramswith maximum preservation of the global shape as well as preservation ofthe shapes of the interior polygons. To the inventors' knowledge, thereis currently no currently available algorithm with adequate speed toperform that function.

SUMMARY OF THE INVENTION

The present invention addresses the needs described above by providing amethod for generating a cartogram from a plurality of contiguouspolygons having vertices, and from a vector containing valuescorresponding to the polygons. The method includes the steps ofdetermining a first curvature function of a first polygon, performing aFourier transform of the first curvature function to calculate a firstshape value, repositioning one of the vertices of the polygon to producean altered polygon, determining an altered curvature function of thealtered polygon, performing a Fourier transform of the altered curvaturefunction to calculate an altered shape value, calculating a shapedistortion by comparing the first and the altered shape values, anddeciding whether to accept the altered polygon based on the shapedistortion.

The steps of determining curvature functions of the polygons may includeapproximating a region surrounding each vertex with a circular arc. Theperimeter length may be normalized to 2π for each polygon, using aradius of π/50 for the circular arcs. The radius may alternatively beestablished as smaller than one-half a length of a shortest edge of thepolygon.

Each polygon may be represented by a series of concatenated straightlines and radii, the curvature function being a square wave. The stepsof determining curvature functions may include normalizing a perimeterlength for each polygon. That normalized perimeter length may be 2π.

The steps of performing Fourier transforms may include computingcoefficients of Fourier sums analytically. The step of repositioning oneof the vertices of the polygon may include selecting the vertices from aset of vertices in a region of the contiguous polygons having two edgesorthogonal to a preselected scan line. Each step of the method may thenbe performed on all vertices within the region.

The vector values may define target area values of the correspondingpolygons. In that case, the method further includes the steps ofcalculating a relative area error of the first polygon by comparing anactual area value of the first polygon with a corresponding target areavalue, calculating a relative area error of the altered polygon bycomparing an actual area value of the altered polygon with thecorresponding target area value, and determining whether to revert tothe first polygon by comparing the relative area error of the alteredpolygon and the relative area error of the first polygon. The relativearea error of a j^(th) polygon may be defined as$\frac{{A_{desire}^{j} - A_{actual}^{j}}}{A_{desire}^{j} + A_{actual}^{j}},$wherein A_(desire) ^(j) is a target area value for the j^(th) polygonand A_(actual) ^(j) is an actual area value for that polygon.

The method may further include an initial step of selectively removingat least one vertex from the plurality of contiguous polygons. Thevertices may be selected based on a proximity to 180 degrees of an angleformed by adjacent edges, or may be selected based on a length of anadjacent edge. All interior vertices not common to more than twopolygons may be removed. The interior vertices may be removed based oncriteria different from those used to remove vertices on a globalpolygon.

In another embodiment of the invention, a cartogram is generated from amap having a plurality of contiguous map polygons with vertices. Thecartogram has a plurality of cartogram polygons corresponding to the mappolygons, the cartogram polygons having areas proportional to valuescontained in a data vector. That method includes the steps of selectinga vertex for repositioning, the vertex having adjacent polygons,repositioning the selected vertex, determining an area error of theadjacent polygons based on corresponding data vector values, determininga shape error of the adjacent polygons based on a Fourier transformationof a curvature function of a perimeter of each polygon, and decidingwhether to accept or reject the repositioning step based on the shapeerror and the area error.

The curvature function may include circular arcs approximating regionssurrounding each vertex of the polygons. In that case, a perimeterlength of 2π may be normalized for each polygon, in which case a radiusof the circular arcs is π/50. Alternatively, the radius may be smallerthan one half a length of a shortest edge of the polygon.

Each polygon may be represented by a series of concatenated straightlines and radii, in which case the curvature function is a square wave.The curvature function may be normalized to a predetermined perimeterlength, which may be 2π.

Fourier sums may be analytically computed from the Fourier transforms.The step of selecting a vertex may include selecting the vertex from aset of vertices in a region of the contiguous polygons having two edgesorthogonal to a preselected scan line. Each of the steps may beperformed on all vertices within the region.

The area error of a j^(th) polygon may be defined as$\frac{{A_{desire}^{j} - A_{actual}^{j}}}{A_{desire}^{j} + A_{actual}^{j}},$wherein A_(desire) ^(j) is a target area value proportional to valuescontained in the data vector for the j^(th) polygon and A_(actual) ^(j)is an actual area value for that polygon.

As with the previous embodiment, the method may further include theinitial step of selectively removing at least one vertex from theplurality of contiguous polygons.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a traditional map of the United States.

FIG. 1B is a population cartogram of the United States generated usingthe method of the invention.

FIGS. 2A-2H are views of cartograms and pseudo-cartograms generated byprior art methods.

FIG. 3 is a partial map of the United States illustrating a vertex/edgenotation convention.

FIGS. 4A-4G are sample polygons illustrating shape and topologydistortion.

FIG. 5 is a table showing possible constraints for cartogram drawing.

FIGS. 6A & 6B are sample polygons showing shape and topology properties.

FIG. 7 is a table showing possible global polygon constraints forcartogram drawing.

FIG. 8 is a plot of a significance function used in the presentinvention.

FIG. 9 is an algorithm for reducing global vertices according to theinvention.

FIG. 10 is an algorithm for reducing interior vertices according to theinvention.

FIGS. 11A-11C are maps of the United States showing reduction invertices according to the invention.

FIGS. 12A & 12B are sample polygons showing geometry simplificationaccording to the invention; FIG. 12C is a curvature plot of the polygonof FIG. 12B.

FIGS. 13A & 13B show polygons and corresponding curvature plotsaccording to the invention.

FIG. 14 is a scanline algorithm according to the invention.

FIGS. 15A & 15B show sample scanlines and associated parametersaccording to the invention.

FIG. 16 is an algorithm for drawing cartograms according to theinvention.

FIGS. 17A & 17B show a map of the United States with scanlines placedaccording to two embodiments of the invention.

FIGS. 18A, 18B & 18C show cartograms of the United States produced bythree different methods.

FIGS. 19A, 19B & 19C show plots of data used to evaluate the methodsthat produced the cartograms of FIG. 18.

FIG. 20A is a map of the United States showing area error; FIGS. 20B &20C show cartograms produced by the method of the invention showing areaerror.

FIGS. 21A & 21B are plots showing shape versus area error for cartogramsproduced at stages of an algorithm using interactive scanlines.

FIG. 22 shows plots of shape versus area error for cartograms producedusing interactive and automatic scanlines.

FIGS. 23A, 23B & 23C are plots for evaluating the efficiency of themethod of the invention.

DESCRIPTION OF THE INVENTION

The contiguous cartogram problem may be defined in terms of an idealsolution and topology preservation. It is assumed that the input to themethod of the invention is a map defined by a set of connected simplepolygons (a polygonal mesh) P, and a parameter vector {right arrow over(X)} that gives the desired values for the proportional area of eachpolygon. The goal is to generate contiguous cartograms and therefore,the desired output also is a set of connected simple polygons {overscore(P)}. Let |p| denote the number of vertices, A(p) the area, and S(p) theshape of a polygon p, and T(P) the topology of a set of polygons. Then,the ideal solution of the Contiguous Cartogram Drawing problem can bedefined as follows.

A contiguous Cartogram of a set of connected polygons P={p₁, . . . ,p_(k)} with respect to the parameter vector. {right arrow over (X)}={x₁,. . . , x_(k)},(∀jx_(j)>0), is a visualization of the transformed set ofpolygons {overscore (P)}, where

-   -   T({right arrow over (P)})=T(P) (Topology Preservation),    -   S({overscore (p)}_(j))=S(p),∀j=1, . . . , k (Shape        Preservation),    -   A({overscore (p)}_(j))={tilde over (x)}_(j), ∀j=1 . . . , k        (Area Resizing).        The desired area {tilde over (x)}_(j) of a polygon p_(j) is        defined as        ${\overset{\sim}{x}}_{j} = {x_{j} \cdot {\frac{\sum\limits_{i = 1}^{k}{A( p_{j} )}}{\sum\limits_{j = 1}^{k}x_{j}}.}}$

To simplify the description, the following assumes that there is onlyone set of connected polygons (such as the continental United States)and not multiple unconnected sets (such as a world map). Thedefinitions, however, may easily be extended to multiple polygonalmeshes. The heuristic herein described operates on arbitrary maps.

Let ν_(j) ^(i) denote the i-th vertex of polygon p_(j), a^(i) _(j) theangle at the i-th vertex, e_(j) ^(i) the i-th edge, |e_(j) ^(i)| thelength of edge e_(j) ^(i), and CE(ν) the cyclic order of edges at vertexν, as defined by the notation shown in FIG. 3.

If it is assumed that the transformed polygons have the same number ofvertices (i.e., |{overscore (p)}_(i)|=|p_(i)|), then one way offormalizing the topology and shape preservation constraints is toformalize the preservation of connecting vertices and the preservationof edge length ratios and angles.

As to the preservation of connecting vertices, the topology preservationT({overscore (P)})=T(P) means that for each vertex νεE {overscore (P)}the cyclic order of edges remains the same as in P. More formally,

-   -   ∀ν_(j) ^(i) εP, j=1, . . . , k;i=1, . . . , |p_(j)|: ∃{overscore        (ν)}_(j) ^(i) ε{overscore (P)}, j=1, . . . , k; i=1, . . . ,        |{overscore (p)}_(j)|: CE(ν^(j) _(i))=CE({overscore (ν)}_(i)        ^(j))

If the cartogram construction algorithm does not provide a mapping tothe original polygon set, topology preservation is difficult to test,because as a first step, the isomorphism problem between the twocorresponding graphs must be solved. Graph isomorphism is a difficultproblem and, therefore, efficient solutions have to maintain thetopology of the original polygon mesh or provide a mapping to theoriginal polygon mesh.

As to the preservation of edge length ratios and angles, shapepreservation S({overscore (p)}_(i))=S({overscore (p)}_(i)) means thatthe edge length ratios of the polygons and the angles are preserved∀j=1, . . . , k∃c _(j) εR:|ē _(j) ^(i) |=c _(j) |e _(j) ^(i) |,i=1, . .. ,|p _(j) |,e _(j) ^(i) εP,ē _(j) ^(i) ε{overscore (P)},  (i)∀j=1, . . . , k∀i=1, . . . , |p _(j) |:ā _(j) ^(i) =a _(i) ^(j).  (ii)

As a simple example, a map with the topology of a checkerboard (FIGS. 4A& 4D) is resized according to the color of the fields, scaling whitefields by a factor of 1.5 and black fields by a factor of 0.5. Thatrescaling is impossible without changing the topology or shapes. In thecase of the 2×2 grid, FIG. 4B shows solutions in which shape wasmaintained but topology was relaxed; FIG. 4C shows relaxed shape. In thecase of the 3×3 grid, FIG. 4E shows relaxed topology, FIG. 4G showsrelaxed shape and FIG. 4F shows both characteristics relaxed. Ingeneral, it is impossible to achieve the ideal solution. Thatobservation may be stated as follows: the above-described cartogramdrawing problem is unsolvable in the general case; i.e., there existsets of polygons and parameter vectors such that it is impossible toobtain an ideal solution. The checkerboard topology of FIG. 3 providesan example of such a set of polygons for which there is no idealcartogram solution.

To derive feasible variants of the problem, some of the featurepreservation conditions must be relaxed. If topology is the mostimportant property to maintain, the only other conditions left to relaxare the shape and area constraints. Those are explored in terms of twodistance functions —an area distance function (which measures thedistance of the area of a polygon from the desired size, typically,difference in area in the Euclidean plane) and a shape distance function(which measures the similarity of two shapes). FIG. 5 is a tablecontaining an enumeration of possible constraints. The first column 51lists constraints that require a maximum distance for each polygon, thesecond column 52 lists constraints that require a maximum distance forthe sum of the distances of all polygons, and the third column 53 listsminimum constraints for the sum of distances. By combining the differentarea and shape constraints shown in FIG. 5, variants of the cartogramdrawing problem may be constructed. A useful combination would be, forexample, a restriction of the solution space to solutions where theshape of each polygon has at least a certain similarity to its originalshape and the sum of all area differences is minimal. The followingdiscussion relates to the different variants of the problem and theircomplexity.

As noted above, in general it is impossible to find an ideal solution ofthe cartogram drawing problem. It is furthermore noted that any variantof the cartogram drawing problem that involves the single-polygon areaconstraint or the all-polygon area constraint, as tabulated in FIG. 5,is also unsolvable in the general case, i.e. there exist sets ofpolygons P and parameter vectors {overscore (X)}, such that for any εthe problem variants do not have a valid, topology-preserving solution.

FIG. 6A is an example of a symmetric cartogram consisting of sevenpolygons. If the parameter vector for scaling the polygons requires thelight polygons to become larger and the dark ones to become smaller, animpossible case can easily be constructed. Due to the symmetricconstruction of the polygons, without loss of generality we can assumethat one angle $\gamma \leq {\frac{\pi}{3}.}$Thus,$\alpha = {{{2\quad\pi} - {2\quad\beta} - \gamma} \geq {{2\quad\pi} - {2\quad\beta} - \frac{\pi}{3}}}$For the above mentioned resize requirements (triangle A very large andtriangles B very small), β→0 and therefore${\alpha \geq {{2\quad\pi} - \frac{\pi}{3}}} =  {\frac{5}{3}\pi}\Rightarrow{\alpha > \pi} $and thus the topology cannot be preserved, as shown in FIG. 6B.

That means that only variants of the problem that use the minimum-areacondition are solvable, and that is true for any combination with ashape constraint. The solvability is trivial to see since there is atleast the identity solution, which yields a perfect shape preservationbut a rather bad value for the area difference. As the following shows,the determination of the actual solution with the minimum areadifference, however, is a computationally hard problem.

Any variant of the cartogram drawing problem that involves theminimum-area condition is NP-complete. That may be shown using aconstrained, simplified version of the cartogram problem called the“integer cartogram problem.” The proof shows that a solution to theinteger cartogram problem would imply a solution of the planar 3-SATproblem which is known to be NP-hard.

In using the integer cartogram variant of the problem one easilyobserves that there is little freedom to improve the second importantparameter, namely the shape. In most cases, the minimum area conditionwill provide some solution that is best optimized according to the areacondition but does not take the shape similarity into account. Theremight be, for example, a solution that much better preserves the shapebut is a little bit worse in area. To allow the shape constraint to havean impact on the solution, the constraints must be adapted. Inprinciple, there are two possibilities. The first is to determine theminimum area difference possible and then allow a certain maximumdeviation from this minimum difference for finding the best shape. Moreformally, this may be defined by defining two variants of the contiguouscartogram problem.

First, given a set of polygons P, a parameter vector {right arrow over(X)}, and an error value ε, the contiguous cartogram problem may bedefined as a transformed set of polygons {overscore (P)} for which thefollowing two conditions hold: $\begin{matrix}{{\sum\limits_{j = 1}^{k}{d_{A}( {{\overset{\sim}{x}}_{j},{A( {\overset{\_}{p}}_{j} )}} )}} \leq {\frac{MIN}{??}( {{d_{A}( {{\overset{\sim}{x}}_{j},{A( {\overset{\_}{p}}_{j} )}} )} + ɛ} }} & (1) \\{{\sum\limits_{j = 1}^{k}{d_{S}( {{S( p_{j} )},{S( {\overset{\_}{p}}_{j} )}} )}}\overset{!}{arrow}\min} & (2)\end{matrix}$Alternatively, the area and shape distances may be normalized and aweighted mean of the normalized distances may be used as a combinedoptimization criterion.

Second, given a set of polygons P, a parameter vector {right arrow over(X)}, and importance factors for the area and shape distances, thecontiguous cartogram problem may be defined as the transformed set ofpolygons P for which${{a \cdot {\sum\limits_{j = 1}^{k}{d_{A}( {{\overset{\sim}{x}}_{j},{A( {\overset{\_}{p}}_{j} )}} )}}} + {b \cdot {\sum\limits_{j = 1}^{n}{d_{S}( {{S( p_{j} )},{S( {\overset{\_}{p}}_{j} )}} )}}}}\overset{!}{arrow}{\min\limits_{a,{b \geq 0}}.}$

There are other meaningful and solvable variants of the problem that,for example, also include the single-polygon constraints, asdemonstrated by the table of FIG. 5. Most currently available algorithmstry to solve the problem according to one of the two variants above.While that seems sufficient for some applications, there are otherswhere additional constraints seem necessary.

In addition to the shape and area constraints discussed above withreference to FIG. 5, the inventors have found that the global shape isone of the most important factors for cartograms to be effective, and itis certainly at least as important as the preservation of interiorpolygon shapes. In the definition of the cartogram drawing problem,besides the shape and area constraints discussed above, the inventorstherefore explicitly include a global shape constraint which may beagain either a single-polygon, all-polygon, or minimum constraint forthe global shape(s) (note that there may be multiple global shapes asthey occur, for example, on a world map). If G_(r)(P)(r=1 . . . l,l<k)denotes the set of global polygons that may be derived from the set ofpolygons P, the global shape constraints may formally be described asgiven in the table of FIG. 7. The final definition of the cartogramdrawing problem below uses a weighted minimum of area, shape, and globalshape constraints.

Given a set of polygons P, a parameter vector {right arrow over (X)},and importance factors for the area, shape, and global shape constraintsa, b, and c, the contiguous cartogram problem may be defined as atransformed set of polygons {overscore (P)} for which${{a \cdot {\sum\limits_{j = 1}^{k}{d_{A}( {{\overset{\sim}{x}}_{j},{A( {\overset{\_}{p}}_{j} )}} )}}} + {b \cdot {\sum\limits_{j = 1}^{n}{d_{S}( {{S( p_{j} )},{S( {\overset{\_}{p}}_{j} )}} )}}} + {c \cdot {\sum\limits_{r}{d_{S}( {{S( {G_{r}({??})} )},{S( {G_{r}( \overset{\_}{??} )} )}} )}}}}\overset{!}{arrow}\min\limits_{a,b,{c \geq 0}}$

Turning to some observations crucial for an efficient solution of theproblem, one important observation is that in practice, only very fewvertices are actually important for defining the shapes of the polygons.In considering the U.S. map, for example, the inventors found that inaddition to a restricted number of outer vertices, only a limited numberof interior vertices are actually relevant. Note also that theimportance of polygons and their vertices largely depends on their size(which is directly related to the parameter vector) and on the length ofthe edges and the angles between them. In the inventive algorithm,special consideration is given to those facts and the importance ofvertices is determined based on those observations. A second observationis that, in order to obtain good results, the shape error has to becontrolled explicitly. A last observation is that the high timecomplexity of most algorithms proposed previously is due to a complexand time-consuming optimization. In most cases, however, it is possibleto locally reposition vertices and improve the area error whileretaining the shape. To obtain good solutions, the algorithm of thepresent invention iteratively repositions vertices based onscanline-defined locality measures with an explicit shape error controlfunction.

The objective of the cartogram drawing algorithm of the invention is afast generation of cartograms of acceptable quality. Because input mapsoften have far more vertices than are needed to compute good cartograms,the first step is an intelligent decimation. That is followed by thecentral heuristic, scanline-based repositioning of vertices. Vertices ofthe global polygon(s) are first repositioned, followed by interiorvertices. Scanlines can be restricted to vertical and horizontal linesdetermined automatically, or may be arbitrarily positioned line segmentsof any length, entered interactively. In each step, the shape of themodified polygon mesh is controlled by the shape error function. Thelast step is fitting the undecimated polygons to the decimated mesh toobtain the output cartogram. By exploiting the potential forpre-computation and fast local optimization, the inventive algorithmruns quickly enough to support dynamic displays with high update rateson maps having dozens of polygonal regions.

Edge reduction algorithms used in the inventive method will now bediscussed. As noted, preserving the global shape is very important inmaking recognizable cartograms. Decimation algorithm of the inventiontakes that into account by simplifying the global and inner polygonsdifferently.

Regarding reduction of the global polygon, a key observation is that theimportance of the vertices of a polygon can vary greatly. Vertices onangles near 180 degrees and those with short edges make almost nonoticeable difference in the shape of a polygon, while others with sharpangles or long edges have a significant effect. The basic idea of theglobal polygon reduction algorithm is to rate the importance of eachvertex according to those criteria. Then, iteratively, the leastimportant vertices are removed. To maintain the topology, only verticesthat do not belong to multiple polygons are removed. To formalize theglobal reduction algorithm, the notion of a vertex's importance is firstdefined asI(ν)=Sig(a ^(ν))·|e ₁ ^(ν) |·|e ₂ ^(ν)|where e₁ ^(ν) and e₂ ^(ν) are the two edges of vertex νand Sig(a^(ν)) isa function denoting the significance of the angle α^(ν) at vertex ν. Thesignificance function Sig(a) is important because different angles havea specific impact on the shape of the polygons. Sharp angles and anglesclose to 90 degrees are more important than obtuse angles and thesignificance function therefore assigns higher values to sharp anglesand lower values for obtuse angles. For our algorithm, we use${{Sig}(\alpha)} = {\sum\limits_{\mu \in {\{{0,90,270,360}\}}}\exp^{\frac{{({\alpha - \mu})}^{2}}{2\quad\sigma^{2}}}}$as the significance function. That function has peaks for α=0, 90, 270,360 degrees and is close to zero for α=180 degrees. The function isdefined for α=]0°, 360°[ and σ is chosen to be 0.2 π. FIG. 8 shows aplot of that function.

To formalize the global reduction algorithm, the global polygon is firstdefined as a subset of the vertices of P. For each polygon p_(j), I=1 .. . k, the portion gp_(j) of the global polygon GP can be defined asgp _(j) ={νεp _(j): |edges(ν)|>|polygons(ν)|}

The global polygon is defined as GP=${GP} = {\bigcup\limits_{j = {1\quad\ldots\quad k}}{{gp}_{j}.}}$The algorithm for the reduction of the global polygon is shown in FIG.9. The algorithm initializes V(step 91) so that vertices are onlyconsidered for removal if they do not belong to multiple polygons.Vertices are removed if the induced area difference is smaller than agiven constant MaxAreaDiff (step 92). Note also that the area A_(s)(p)of a polygon p is determined as if the polygon is perfectly scaledaccording to the parameter vector X and the area difference∥A_(s)(p₁)−A_(s)(p₂)∥— the subscript s of A_(s) stands for scaled—isdefined as∥A _(s)(p ₂)−A _(s)(p ₂)∥:=(A _(s)(p ₁)∪A _(s)(p ₂))\(A _(s)(p ₁)∪A_(s)(p ₂))

To position interior vertices, an iterative vertex removal may again beused. A more efficient alternative is based on the observation that formost maps only the connecting interior vertices are important. In thepreferred embodiment, instead of iteratively removing unimportantinterior vertices, a more direct approach is taken by removing allvertices not common to more than two polygons (non-connecting vertices).In some cases, the shape deformation and area error introduced by thatreduction is unacceptably high. A few additional vertices are thereforere-introduced. The complete algorithm is shown in FIG. 10.

As an example of the reduction technique of the invention, the interiorvertices of a polygon mesh containing 743 interior vertices (FIG. 11A)are reduced to only the 204 interior vertices common to more than twopolygons (FIG. 11B). A few additional vertices are re-introduced in thefinal polygon containing 343 interior vertices (FIG. 11C). In practice,only a few polygons need the additional vertices, so the likelihood ofre-introducing vertices that were removed is low.

The main cartogram drawing algorithm will now be discussed. Thealgorithm incrementally repositions the vertices along a series ofscanlines. A scanline is a line segment of arbitrary length andposition. Each scanline defines a scan section, orthogonal to thescanline. All points within a scan section are repositioned in a singlestep. For each section on a scanline, a target scaling factor for eachof its polygons is determined according to their area error factors.Vertices are then repositioned according to the polygon scaling factorsand distances to the scanline. The repositioning may be parallel ororthogonal to the scanlines. If the shape error introduced by applying ascanline exceeds some threshold, its candidate vertex repositionings arediscarded.

Scanlines should be applied to parts of the map where the area error islarge and there is still potential for improvement. A simple approach toscanline generation is to use horizontal and vertical line segmentspositioned on a regular grid. Significantly better results can beobtained by a manual scanline placement, guided by the shape of theinput polygons and the local potential for improvement. Note that theincremental repositioning of vertices per scanline application isintentionally small, compared to the expected change in area. That meansthe same scanline may need to be applied many times to make largeadjustments in an area.

Before describing the main algorithm, its three main components will beintroduced: the area error function, the shape similarity function, andthe scanline algorithm.

The area error function is directly related to the objective ofcartogram generation; i.e., to obtain a set of polygons where the areaof the polygons corresponds to values given in a data vector X. In eachstep of the algorithm, the area error function is needed to determinethe reduction of the area error achieved by applying a given$E_{rel}^{j} = \frac{{A_{desire}^{j} - A_{actual}^{j}}}{A_{desire}^{j} + A_{actual}^{j}}$Hence, the area error for the set of polygons P is defined as$E_{rel}^{??} = {\sum\limits_{j = 1}^{k}\quad( {E_{rel}^{j} \cdot \frac{A_{desire}^{j}}{\sum\limits_{j = 1}^{k}A_{desire}^{j}}} )}$

In addition to reducing area error, the cartogram generation processalso employs a shape similarity function that aims at retaining theoriginal shapes. To assess shape preservation, a shape similarityfunction is needed that compares the new shape of a polygon with itsoriginal shape. Defining a useful shape similarity function is in itselfa difficult problem, since the similarity measure should betranslation-invariant, scale-invariant, and at least partiallyrotation-invariant. From CAD research it is known that the Euclideandistance in Fourier space is useful for measuring shape similarity. Togain invariance against translation, rotation, and scaling, thealgorithm uses the Fourier transformation of the differential geometriccurvature of the polygons, instead of the polygons themselves, andnormalizes the arc length of the polygons to 2π. Using the curvatureguarantees translation- and rotation-invariance, and normalizing the arclength guarantees scale-invariance.

In the following, it is assumed that the polygons are transformed into anormalized parameterized polygon contour function p:[0,2π]→R². Then,curvature C of the polygons may be defined asC:(R→R²)→(R→R²).

The Fourier transformation F is a transformationF:(R→R²)→R^(d),determining the Fourier coefficients for a given curvature function ind-dimensional Fourier space. The shape similarity of two polygons p and{overscore (p)} can then be defined asd _(S)(S(p), S({overscore (p)}))=d _(Euclid)(F(C(p)), F(C({overscore(p)}))).In the following, the curvature transformation C and the Fouriertransformation F are described in more detail.

In general, the curvature of a polygon defined as a parameterizedfunction is mathematically undefined because the second derivative isnot continuous. That problem can be avoided by approximating a polygon120 (FIG. 12A) by replacing each vertex 121, 122, 123 with a very smallcircular arc 125, 126, 127, shown in FIG. 11B. That yields a newgeometric object 128 of which the first derivative is continuous. Thecurvature of that object is defined in sections; concatenating thosesections yields the curvature as square wave function 129 (FIG. 12C).

To describe the curvature transformation in more detail, this discussionwill focus on two adjacent edges e_(i-1) and e_(i). Those edges coincidein vertex ν_(i) with an angle α_(i). For the polygon containing ν_(i),the curvature function c_(i)(t), describing the differential geometriccurvature of the approximated polygon, may be easily computed, becausethe curvature of a circle segment with radius r is a constant function1/r and the curvature of a straight line is a constant zero function.The arc length of the circle segment may be calculated by substitutingvertex ν_(i) by b_(i)=|α_(i)|·r. For c_(i)(t), we therefore obtain${c_{i}(t)} = \{ \begin{matrix}{1/r} & {{if}\quad( {{t_{v_{t}} - {b_{i}/2}} > t > {t_{v_{t}} + b_{i/2}}} )} \\0 & {otherwise}\end{matrix} $

The curvature of an arbitrary polygon p is${c(t)} = {\sum\limits_{k = 0}^{{p} - 1}{{c_{k}(t)}.}}$An example of a graph of the curvature function c(t) for theapproximation of the polygon section of FIG. 12A is shown in FIG. 12C.In another example, the curvature function 135 of FIG. 13B is identicalfor two polygons p₁ and p₂ shown in FIG. 13A undertranslation-invariance, rotation-invariance, and scale-invariance.

The approximation of the original polygon, and in particular the choiceof r, influences the curvature function. If the radius r of the circlesegment is reduced, 1/r will be increased while b_(i) will be decreased.That causes c(t) to become narrower and the amplitude of square waves tobecome higher, while the approximation of the polygon converges againstthe polygon itself. On the other hand, c(t) becomes difficult to handlenumerically. An adequate value for r that has proven useful for ourapplication is π/50 for polygons with a normalized length of 2π. Theinventors have found that the similarity function is quite robustagainst a sub optimal choice of r, as long as r is smaller than half ofthe length of the shortest edge since otherwise individual square wavefunctions may overlap.

The next step is computing the Fourier transformation F of thecurvature. The principle of the Fourier transformation is to approximatea function by summing up sine and cosine functions with certainparameters. The quality of the approximation is improved by increasingthe degree d of the Fourier approximation, which means to successivelysum up cos(x), sin(x), cos(2x), sin(2x), . . . , cos(kx), sin(kx). Moreformally, the Fourier approximation of a function ƒ with a period of 2πis defined as${F(x)} = {\frac{a_{0}}{2}{\sum\limits_{k = 1}^{n}\quad( {{a_{k}{\cos({kx})}} + {b_{k}{\sin({kx})}}} )}}$where the coefficients a_(k) and b_(k) are defined as$a_{k} = {{\frac{1}{\pi}{\int_{0}^{2\pi}{{f(x)}{\cos({kx})}\quad{\mathbb{d}x}\quad{and}\quad b_{k}}}} = {\frac{1}{\pi}{\int_{0}^{2\pi}{{f(x)}{\sin({kx})}\quad{{\mathbb{d}x}.}}}}}$

In general, integrals of the form ∫ƒ(x)sin(x)dx are difficult to solveanalytically. For the special case where ƒ(x) is a square wave function,however, the integral can be easily determined. Let us assume that ƒ(x)has a value of 1/r in the interval [u, ν] and is zero elsewhere. Sincethe value of the integral is zero outside of [u, ν] it is necessary tointegrate only from u to ν. Therefore, it is possible to calculate a_(k)and b_(k) as$a_{k} = {{\frac{1}{\pi\quad{kr}}( {{\sin({kv})} - {\sin({ku})}} )\quad{and}\quad b_{k}} = {\frac{1}{\pi\quad{kr}}{( {{\cos({kv})} - {\cos({ku})}} ).}}}$

To determine the Fourier coefficients of the curvature function c(t) ofthe whole polygon p, we only have to sum up the above formula c_(i)(t)for all vertices νi of the polygon. We obtain the following formulas forthe Fourier coefficients:$a_{k} = {\frac{1}{\pi\quad{kr}}{\sum\limits_{i = 0}^{{p} - 1}{\frac{\alpha_{i}}{\alpha_{i}}( {{\sin( {k( {t_{i} + \frac{{\alpha_{i}r}}{2}} )} )} - {\sin( {k( {t_{i} + \frac{{\alpha_{i}r}}{2}} )} )}} )}}}$$b_{k} = {\frac{1}{\pi\quad{kr}}{\sum\limits_{i = 0}^{{p} - 1}{\frac{\alpha_{i}}{\alpha_{i}}( {{\cos( {k( {t_{i} + \frac{{\alpha_{i}r}}{2}} )} )} - {\cos( {k( {t_{i} + \frac{{\alpha_{i}r}}{2}} )} )}} )}}}$

The calculation of a_(k) and b_(k) can be done in O(|p|) time, and thecalculation of all coefficients can be done in O(|p|d), where d is thedegree of the Fourier sum. Note that it is possible to compute thecoefficients of the Fourier sum analytically, and therefore not to runinto numerical problems such as finding the right sample rate.Experimental results show that the Fourier transformation provides agood approximation of the polygons and their curvature function even forrather small d.

An important feature of the cartogram drawing algorithm of the presentinvention is the scanline heuristic, which incrementally repositionsvertices along scanlines. A scanline sl is a line segment of arbitraryposition and length and is partitioned into n portions of length$\frac{{sl}}{n}.$As shown in FIG. 15A, the scanline section points sp_(i)(i=0 . . . n)define n+1 sections (e.g., sections 150 a, 150 b) of the polygon mesh152, which are orthogonal to the scanline 155. In one step of thescanline algorithm, all vertices νεV_(i) within a certain distance(distance 157) $( {\xi = \frac{{sl}}{2n}} )$of I_(i) are considered for incremental repositioning. Let SF_(i) be theset of polygons (by index number) that have at least one vertex inscanline section i (i=0 . . . n). Then, the scaling factor SF_(i) isdetermined according to the area error of all polygons p in section i:${SF}_{i} = {{const} \cdot {\sum\limits_{r \in S_{i}}{( \quad{\frac{{\overset{\sim}{x}}_{r} - {A( p_{r} )}}{{\overset{\sim}{x}}_{r} + {A( p_{r} )}} \cdot \frac{{\overset{\sim}{x}}_{r}}{\sum\limits_{l \in S_{i}}^{n}{\overset{\sim}{x}}_{l}}} ).}}}$

Next, the direction o(ν) of a vertex ν is determined and the scalingfactor SF_(i) is applied to reposition the vertex. The repositioning canbe done either in the direction of the scanline (direction=scanline) orin the direction of the section line l_(i) (FIG. 15A). The algorithm isshown in FIG. 14. In a preferred embodiment, the scanline sections spanthe full range orthogonal to the scanline of the polygon net.Alternatively, the changes may be restricted to be local in bothdirections by limiting the considered polygons to those close to thescanline, for example, within a circle 159 (FIG. 15B) of radius ξ. Thatoption is not reflected in the algorithm shown in FIG. 14.

Having defined the components of the cartogram drawing algorithm, themain procedure is now described. The algorithm assumes as input a set ofpolygons P, a scaling vector of the desired statistical parameter {tildeover (X)} and a set of scanlines SL, which can be determinedautomatically or manually as described below. Output is the modified setof polygons P that describes the cartogram. The algorithm is shown inFIG. 16 and works as follows. For each scanline (step 160), thealgorithm applies the scanline transformation (step 161) and checks theresults (step 162). If the area difference E_(rel) introduced by thescanline transformation is below a certain threshold ε_(A) and the shapedistortion is below a certain threshold ε_(s), then the changes areretained and otherwise discarded. Then, the algorithm proceeds with thenext scanline until all scanlines are applied in the same way. At thatpoint, the algorithm checks whether in applying all scanlines animprovement of the area error has been obtained. If that is the case,the algorithm applies all scanlines again and repeats the entireprocedure until no further improvement is reached (step 165) (areaimprovement below 68). Since the area error improvement must be positiveand above the threshold e in each iteration, the area error ismonotonously decreasing and termination of the algorithm is guaranteed.Note that in applying an individual scanline, the algorithm is allowedto potentially increase the area error, to allow escaping local optima.Also, notice that after applying a scanline, all the other onesremaining to be processed must be transformed as well, so that theycorrespond properly to the transformed map.

The set of scanlines SL used by the algorithm may be defined eitherautomatically or interactively. The automatic generation of scanlinesuses a fixed grid of horizontal and vertical scanlines. An example of anautomatically generated scanline grid 171 generated to cover a polygongrid 172 representing the continental United States is shown in FIG.17A. The grid's resolution may be varied, but within reason that hasonly a minor influence on the result. Because only those scanlines thatdo not induce a higher shape and area error are applied, generating manyuseless scanlines causes a potential loss in efficiency, but does notaffect the quality of the result.

The inventors have found that the best cartograms seem to be obtainedwhen the scanlines are well adapted to the shape of the input polygonsand are placed in areas with a high potential for improvement. Automaticplacement based on those criteria is difficult to achieve so, in apreferred embodiment of the invention, the user is allowed tointeractively position the scanlines depending on the results of theprevious steps. The user usually starts with scanlines in regions with ahigh area error. The scanlines seem to work best if they are positionedsuch that they are either parallel or orthogonal to the contour of theglobal polygon. An example a scanline 175 is shown in FIG. 17B.

Once the scanlines are specified for a given polygon mesh, they may bestored and re-applied later to different data on the same map. Thatmakes it practical to generate a continuous time series of cartograms,without user interaction in each step. While the generated cartogram maynot be as good as if the scanlines were specified anew, the results seemsufficient for many applications. In the inventors' experience, manualpositioning of scanlines is not difficult and can be done quickly. Forexample, the scanlines shown in FIG. 17B took about 5 minutes to enter.Note that parts of the map such as region 176 that need large changeshave many scanlines of varying lengths, while other parts have very fewscanlines.

The inventors have implemented the algorithm described above in C usingthe LEDA library described in Kurt Mehlhom and Stefan Naher, “The LEDAPlatform of Combinatorial and Geometric Computing,” Cambridge UniversityPress (1st ed. 1999), http://www.mpi-sb.mpg.de/-˜mehlhorn/LEDAbook.html.The algorithm was run on a number of different example applications.Unless noted otherwise, the tests were performed on a 1 GHz Pentiumcomputer with 128 Mbytes of main memory. The results of severaldifferent approaches are compared below. Although the focus is onefficiency, the examples show that the algorithm of the inventions alsoprovides results of very high quality. For most of the examples, a statemap of the continental U.S. serves as a running example.

For purposes of comparison, FIG. 18A shows a population cartogramgenerated by the technique of Tobler (supra), 18B shows a cartogramgenerated by Kocmoud & House (supra) and 18C show population cartogramsgenerated by the algorithm of the present invention. A visual comparisonshows that the presently-described approach offers comparable if notbetter visual results, with the geography of the United States beingclearly perceivable.

To evaluate the results analytically, a total area error Ere, iscompared for all three approaches. As can be seen in FIG. 19A, thepresently described algorithm 191 provides better results 191 than thoseof Tobler 193 and even improves upon the results 192 of the complexoptimization-based approach of Kocmoud and House. Since the total areaerror is basically an average over the state-wise area error, the areaerror is shown state by state in FIG. 19B, sorted according to the areaerror. The resulting plot 194 reveals that for most states the presentapproach 197 provides a much better area error than that of the Toblercartogram 195 and a slightly better area error than that of the Kocmoud& House cartogram 196, with very few exceptions. Note that the Toblercartogram was not optimized according to the error measure describedherein, which puts higher weights on polygons that should become large.Since many of the polygons with large weights still have a large areaerror in the Tobler cartogram, the overall improvement of E_(rel) by theTobler cartogram is low.

In terms of efficiency, the present approach is faster than existingtechniques. While previous approaches need hours or even days to computea solution, an implementation of the presently described algorithm runsin a matter of seconds. A comparison is shown in FIG. 19C, which assumesthat both algorithms run on a 120 MHz computer with 32 MByte RAM. Ascanline-based heuristic 198 needs about 25 seconds while the Kocmoud &House approach 199 needs about 16 hours, making the present approachabout 2000 times faster.

One important aspect of the cartogram drawing algorithm of the inventionis the specification of the scanlines. As mentioned previously, thepresent algorithm allows scanlines to be determined automatically orinteractively. Those two approaches are now compared with respect toeffectiveness (quality of the results) and efficiency (time needed toproduce the results).

An original US map 200 (FIG. 20A) is distorted in this example usingautomatically generated scanlines (FIG. 20B) and interactively generatedscanlines (FIG. 20C). Both approaches provide high quality cartograms.The area error E_(rel) is 0.36 for the original map; is 0.21 for thecartogram generated with automatically placed scanlines and is 0.10 forthe cartogram generated with interactively placed scanlines. Shapedistortion, however, appears to be higher for the interactively placedscanlines. To measure shape distortion, the inventors use theFourier-based shape similarity function described above. The results,shown in FIGS. 21A and 21B, show a tradeoff between area and shapeerror. Those errors are shown for each incremental step of thealgorithm, for the interior state polygons (FIG. 21A) and the globalpolygon (FIG. 21B). Each point corresponds to one intermediate result ofthe algorithm (with interactive scanlines). In the beginning, there is alarge area error E_(rel)=0.36. By applying a scanline, the area error isimproved but the shape becomes more distorted. It is therefore naturalthat the curve goes from the lower right to the upper left until thearea error is small enough or the shape distortion reaches somethreshold. A similar behavior can be observed for the global shape.There is however a slight difference: while the area error stillimproves from one step to the next, the distortion global shape in somecases even gets better.

Comparing the area-shape error tradeoff of interactive versus automaticscanlines reveals some interesting properties of the algorithm. As canbe seen in FIG. 22, early in the run, both approaches have a similartrend in shape-area error tradeoff. At a certain point, however, theautomatically generated scanlines lead to a deterioration in area errorthat subsequent scanlines are not able to improve. In case ofinteractively generated scanlines, the area error continues to improveby smaller and smaller increments. Note the jump in shape error for anarea error of about E_(rel)=0.15. At that point, the direction wasswitched from scanline to section line as described above, which leadsto a continued improvement of the area error but a considerabledeterioration of the shape error.

The inventors also performed extensive experiments to evaluate theefficiency of the inventive algorithm. The time needed to run thealgorithm on the U.S. population data is about 2 seconds. If theparameter vector is changed, the time needed for the reduction stepversus the scanline execution varies slightly between 40% and 60%. FIG.23A shows the percentages needed for the two steps of the algorithm fornine different parameter vectors, namely long-distance telephone callvolume data by state for nine time steps during a day. Note that thereduction step can be precomputed so that it does not have to be re-runeach time the algorithm is executed.

The effect of changing the length of scanlines was also analyzed. FIG.23B shows the results for the 144 interactively defined scanlines forthe US population data. The time needed to process a scanline dependsonly on the number of scanline sections, which in turn depends only onthe length of the scanlines. That means that a steep increasecorresponds to long scanlines and a shallow increase corresponds toshort scanlines. The figure reveals that shorter scanlines are morelikely toward the end of the process and are used for fine tuning someportions of the polygon. Nevertheless, some shorter scanlines areapplied regularly in the process as indicated by the irregularities inthe curve.

Another efficiency analysis was aimed at testing the dependency of thealgorithm on the number of polygons. Since there are not many differentreal data sets with a widely varying number of polygons, the inventorsgenerated synthetic data sets, namely checker boards with an increasingnumber of rectangular polygons. Random numbers were then used forinitializing the parameter vectors. FIG. 23C shows the results of thosetests, revealing a clear linear dependency on the number of polygons.The algorithm requires about 16 seconds for a polygon net consisting of90,000 polygons. Note, however, that in this case the number of verticesper polygon is very low (four) and a reduction of vertices is notnecessary.

The foregoing Detailed Description is to be understood as being in everyrespect illustrative and exemplary, but not restrictive, and the scopeof the invention disclosed herein is not to be determined from theDetailed Description, but rather from the claims as interpretedaccording to the full breadth permitted by the patent laws. For example,while the measurement of shape error using a Fourier transform of acurvature function is described in combination with a scanline algorithmfor vertex placement, that shape error technique may be used with othervertex placement methods while remaining within the scope of theinvention. It is to be understood that the embodiments shown anddescribed herein are only illustrative of the principles of the presentinvention and that various modifications may be implemented by thoseskilled in the art without departing from the scope and spirit of theinvention.

1. A method for generating a cartogram from a plurality of contiguouspolygons having vertices, and from a vector containing valuescorresponding to the polygons, the method comprising the steps of:determining a first curvature function of a first polygon; performing aFourier transform of the first curvature function to calculate a firstshape value; repositioning one of the vertices of the polygon to producean altered polygon; determining an altered curvature function of thealtered polygon; performing a Fourier transform of the altered curvaturefunction to calculate an altered shape value; calculating a shapedistortion by comparing the first and the altered shape values; anddeciding whether to accept the altered polygon based on the shapedistortion.
 2. The method of claim 1, wherein the steps of determiningcurvature functions of the polygons include approximating a regionsurrounding each vertex with a circular arc.
 3. The method of claim 2,further comprising the step of normalizing a perimeter length of 2π foreach polygon, and wherein a radius of the circular arcs is π/50.
 4. Themethod of claim 2, wherein the radius is smaller than one half a lengthof a shortest edge of the polygon.
 5. The method of claim 1, whereineach polygon is represented by a series of concatenated straight linesand radii, and the curvature function is a square wave.
 6. The method ofclaim 1, wherein the steps of determining curvature functions includenormalizing a perimeter length for each polygon.
 7. The method of claim6, wherein the perimeter length is normalized to 2π.
 8. The method ofclaim 1, wherein the steps of performing Fourier transforms includecomputing coefficients of Fourier sums analytically.
 9. The method ofclaim 1, wherein the step of repositioning one of the vertices of thepolygon includes selecting the vertices from a set of vertices in aregion of the contiguous polygons having two edges orthogonal to apreselected scan line.
 10. The method of claim 9, wherein each of thesteps is performed on all vertices within the region.
 11. The method ofclaim 1, wherein the vector values define target area values of thecorresponding polygons, and further comprising the steps of: calculatinga relative area error of the first polygon by comparing an actual areavalue of the first polygon with a corresponding target area value;calculating a relative area error of the altered polygon by comparing anactual area value of the altered polygon with the corresponding targetarea value; and determining whether to revert to the first polygon bycomparing the relative area error of the altered polygon and therelative area error of the first polygon.
 12. The method of claim 11,wherein the relative area error of a j^(th) polygon is defined asfollows:$\frac{{A_{desire}^{j} - A_{actual}^{j}}}{A_{desire}^{j} + A_{actual}^{j}}$wherein A_(desire) ^(j) is a target area value for the j^(th) polygonand A_(actual) ^(j) is an actual area value for that polygon.
 13. Themethod of claim 1, further comprising the initial step of selectivelyremoving at least one vertex from the plurality of contiguous polygons.14. The method of claim 13, wherein the step of selectively removing atleast one vertex comprises selecting a vertex based on a proximity to180 degrees of an angle formed by adjacent edges.
 15. The method ofclaim 13, wherein the step of selectively removing at least one vertexcomprises selecting vertices based on a length of an adjacent edge. 16.The method of claim 13, wherein the at least one vertex is removed byremoving all interior vertices not common to more than two polygons. 17.The method of claim 13, wherein interior vertices are removed based oncriteria different from those used to remove vertices on a globalpolygon.
 18. A method for generating a cartogram from a map having aplurality of contiguous map polygons with vertices, the cartogram havinga plurality of cartogram polygons corresponding to the map polygons, thecartogram polygons having areas proportional to values contained in adata vector, the method comprising the steps of: selecting a vertex forrepositioning, the vertex having adjacent polygons; repositioning theselected vertex; determining an area error of the adjacent polygonsbased on corresponding data vector values; determining a shape error ofthe adjacent polygons based on a Fourier transformation of a curvaturefunction of a perimeter of each polygon; and deciding whether to acceptor reject the repositioning step based on the shape error and the areaerror.
 19. The method of claim 18, wherein the curvature functionincludes circular arcs approximating regions surrounding each vertex ofthe polygons.
 20. The method of claim 19, further comprising the step ofnormalizing a perimeter length of 2π for each polygon, and wherein aradius of the circular arcs is π/50.
 21. The method of claim 19, whereinthe radius is smaller than one half a length of a shortest edge of thepolygon.
 22. The method of claim 18, wherein each polygon is representedby a series of concatenated straight lines and radii, and the curvaturefunction is a square wave.
 23. The method of claim 18, wherein thecurvature function is normalized to a predetermined perimeter length.24. The method of claim 23, wherein the perimeter length is normalizedto 2π.
 25. The method of claim 18, wherein Fourier sums are analyticallycomputed from the Fourier transforms.
 26. The method of claim 18,wherein the step of selecting a vertex includes selecting the vertexfrom a set of vertices in a region of the contiguous polygons having twoedges orthogonal to a preselected scan line.
 27. The method of claim 26,wherein each of the steps is performed on all vertices within theregion.
 28. The method of claim 18, wherein the area error of j^(th)polygon is defined as follows:$\frac{{A_{desire}^{j} - A_{actual}^{j}}}{A_{desire}^{j} + A_{actual}^{j}}$wherein A_(desire) ^(j) is a target area value proportional to valuescontained in the data vector for the j^(th) polygon and A_(actual) ^(j)is an actual area value for that polygon.
 29. The method of claim 18,further comprising the initial step of selectively removing at least onevertex from the plurality of contiguous polygons.
 30. The method ofclaim 29, wherein the step of selectively removing at least one vertexcomprises selecting a vertex based on a proximity to 180 degrees of anangle formed by adjacent edges.
 31. The method of claim 29, wherein thestep of selectively removing at least one vertex comprises selectingvertices based on a length of an adjacent edge.
 32. The method of claim29, wherein the at least one vertex is removed by removing all interiorvertices not common to more than two polygons.
 33. The method of claim29, wherein interior vertices are removed based on criteria differentfrom those used to remove vertices on a global polygon.